{% extends "base.html" %}
{% from "bootstrap/pagination.html" import render_pagination %}
{% from "_marcos.html" import render_table %}

{% block title %}用户管理{% endblock %}

{% block page_content %}
<div class="page-header">

<a href="{{ url_for('auth.register') }}" class="btn btn-primary">注册用户</a>
<p/>
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
     <thead>
        <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>邮箱</th>
        </tr>
    </thead>
    <tbody>
        {% for user in users %}
            {% if loop.index%2==0 %}
                <tr class="odd">
            {% else %}
                <tr class="even">
            {% endif %}

            <td>{{ user.id }}</td>
            <td>{{ user.username }}</td>
            <td>{{ user.email }}</td>
        {% endfor %}
</tr>
    </tbody>
    </table>
</div>
{% endblock %}